
#ifndef GAMEAPP_H
#define GAMEAPP_H

#include "Map.h"
#include "Player.h"
#include "Timer.h"

class GameApp
{
public:
	GameApp(){
		gameMainSurface = NULL;	
		player = new Player();   timer = new Timer();
		currentMap = new Map(30, 16, 170.f, 100.f, 32.f);
	}

	~GameApp();

	void setMainSurface(SDL_Surface *s) { gameMainSurface = s; }
	SDL_Surface *getMainSurface() { return gameMainSurface; }

	void addImage(Image *img) { vImages.push_back(ImagePtr( new Image(*img) ) ); }
	std::vector<ImagePtr> getImages() { return vImages; }

	void addFont(Font *font) { vFonts.push_back(FontPtr( new Font(*font) ) ); }
	std::vector<FontPtr> getFonts() { return vFonts; }

	void addText(Text *text) { vTexts.push_back(TextPtr( new Text(*text) ) ); }
	std::vector<TextPtr> getTexts() { return vTexts; }

	void addTile(Tile *tile) { vTiles.push_back(TilePtr( new Tile(*tile) ) ); }
	std::vector<TilePtr> getTiles() { return vTiles; }

	Map *getCurrentMap() { return currentMap; }

	Player *getPlayer() { return player; }

	Timer *getTimer() { return timer; }

private:
	SDL_Surface *gameMainSurface;
	std::vector<ImagePtr> vImages; 
	std::vector<FontPtr> vFonts;
	std::vector<TextPtr> vTexts;
	std::vector<TilePtr> vTiles;
	Map *currentMap;
	Player *player;
	Timer *timer;
};

#endif